﻿using System.Web.Optimization;

namespace KMF.WebUI
{
    public class BundleConfig
    {
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"
                        ));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));

            // Admin
            bundles.Add(new ScriptBundle("~/bundles/jqueryAdmin").Include(
                        "~/Scripts/jquery.mask.js",
                        "~/Areas/Admin/Content/js/common.js"
                            ));
            // Layout
            bundles.Add(new ScriptBundle("~/bundles/HideLayout").Include(
                        "~/Scripts/common.js",
                        "~/Scripts/jquery.autocomplete.js",
                        "~/Scripts/jquery.cookie.js",
                        "~/Scripts/ScriptOfPage/layout.js",
                        "~/Scripts/Lazyload/jquery.lazyload.js"
                            ));
            // layout promotion
            bundles.Add(new ScriptBundle("~/bundles/HideLayoutPromotion").Include(
                        "~/Scripts/jquery.autocomplete.js",
                        "~/Scripts/jquery.cookie.js",
                        "~/Scripts/ScriptOfPage/Promotion.js",
                        "~/Scripts/Lazyload/jquery.lazyload.js"
                            ));
            // Home index
            bundles.Add(new ScriptBundle("~/bundles/homeIndex").Include(
                        "~/Scripts/common.js",
                        "~/Scripts/jquery.autocomplete.js",
                //"~/Scripts/FlexSlider/flexslider.js",
                        "~/Scripts/Clock/remaining.js",
                        "~/Scripts/ScriptOfPage/home.index.js",
                        "~/Scripts/Lazyload/jquery.lazyload.js"
                ));

            // Product detail
            bundles.Add(new ScriptBundle("~/bundles/productDetail").Include(
                        "~/Scripts/CloudZoom/cloud-zoom.1.0.2.js",
                        "~/Scripts/jquery.cookie.js",
                        "~/Scripts/ScriptOfPage/product.detail.js",
                        "~/Scripts/Rating/jquery.barrating.js"
                //"~/Scripts/ScrollTo/jquery-scrollto.js"
                ));

            // Category Product
            bundles.Add(new ScriptBundle("~/bundles/categoryProduct").Include(
                        "~/Scripts/ScriptOfPage/category.product.js"
                ));

            //Load anh voi nhieu hieu ung
            bundles.Add(new ScriptBundle("~/bundles/cjFancy").Include(
                        "~/Scripts/cjFancy/jqFancyTransitions.js"
                            ));
            bundles.Add(new ScriptBundle("~/bundles/flexSlider").Include(
                        "~/Scripts/FlexSlider/flexslider.js"
                            ));
            //load anh voi bsSlide
            bundles.Add(new ScriptBundle("~/bundles/bsSlider").Include(
                        "~/Scripts/bslide/Js/jquery-latest.js",
                        "~/Scripts/bslide/Js/jquery.bxslider2.min.js",
                        "~/Scripts/bslide/Js/scripts.js"
                            ));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            //  SLIDER RANGE
            bundles.Add(new ScriptBundle("~/bundles/SliderRange").Include(
                        "~/Scripts/SliderRange/jquery-ui-1.10.4.custom.js",
                        "~/Scripts/jquery.mask.js"
                        ));
            bundles.Add(new StyleBundle("~/Content/SliderRange").Include(
                        "~/Scripts/SliderRange/jquery-ui-1.10.4.custom.css"
                        ));

            //  QUICK SEARCH
            bundles.Add(new ScriptBundle("~/bundles/QuickSearch").Include(
                        "~/Scripts/QuickSearch/jquery.quicksearch.js"
                        ));
            bundles.Add(new ScriptBundle("~/bundles/filterCategory").Include(
                                    "~/Scripts/ScriptOfPage/filter.category.js"
                                    ));

            // Admin Bundles Css
            bundles.Add(new StyleBundle("~/Areas/Admin/Content/style").Include(
                        "~/Areas/Admin/Content/css/reset.css",
                        "~/Areas/Admin/Content/css/Style.css"
                        ));

            bundles.Add(new StyleBundle("~/Areas/Admin/Content/AdminStyle").Include(
                        "~/Areas/Admin/Content/AdminTem/Style.css",
                        "~/Areas/Admin/Content/AdminTem/reset.css",
                        "~/Areas/Admin/Content/css/site.css"
                        ));

            bundles.Add(new StyleBundle("~/Content/style").Include(
                    "~/Content/Css/Reset.css",
                    "~/Content/Css/KMF.css"
                ));
            bundles.Add(new StyleBundle("~/Content/stylePromotion").Include(
                    "~/Content/Css/Reset.css",
                    "~/Content/Css/promotion.css"
                ));
            //bsSlide
            bundles.Add(new StyleBundle("~/Content/bxstyles").Include(
                    "~/Scripts/bslide/Css/styles.css"
                ));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));

            //Load anh voi nhieu hieu ung CSS
            bundles.Add(new StyleBundle("~/Content/flexSlider").Include(
                    "~/Scripts/FlexSlider/flexslider.css"
                ));

            // ADMIN -----------------------------------------------------------------------------

            bundles.Add(new ScriptBundle("~/bundles/KMFAdmin/jqueryval").Include(
                        "~/Areas/KMFadmin/Scripts/jquery.unobtrusive*",
                        "~/Areas/KMFadmin/Scripts/jquery.validate*",
                        "~/Areas/KMFadmin/Scripts/globalize.js",
                        "~/Areas/KMFadmin/Scripts/globalize.culture.vi-VN.js",
                        "~/Areas/KMFadmin/Scripts/apply.globalize.vi.js"
                        ));

            // Admin
            bundles.Add(new ScriptBundle("~/bundles/KMFAdmin/jqueryCommon").Include(
                        "~/Areas/KMFadmin/Scripts/jquery.mask.js",
                        "~/Areas/KMFadmin/Scripts/common.js"
                            ));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/KMFAdmin/modernizr").Include(
                        "~/Areas/KMFadmin/Scripts/modernizr-*"));

            bundles.Add(new StyleBundle("~/Content/KMFAdmin/css").Include("~/Content/site.css"));

            // Admin Bundles Css
            bundles.Add(new StyleBundle("~/Content/KMFAdmin/style").Include(
                        "~/Areas/KMFadmin/Content/css/reset.css",
                        "~/Areas/KMFadmin/Content/css/Style.css",
                        "~/Areas/KMFadmin/Content/css/font/Elusive/Elusive.css"
                        ));

            bundles.Add(new StyleBundle("~/Content/KMFAdmin/themes/base/css").Include(
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.core.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.resizable.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.selectable.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.accordion.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.button.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.dialog.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.slider.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.tabs.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Areas/KMFadmin/Content/themes/base/jquery.ui.theme.css"));

            BundleTable.EnableOptimizations = false;
        }
    }
}